package com.example.Android_test.util;

import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 * User: anpi0413
 * Date: 21.05.13
 * Time: 12:49
 * To change this template use File | Settings | File Templates.
 */
public class StringUtils {
    public static String shuffleChars(String word) {
        char chars[] = word.toCharArray();
        Random rnd = new Random();
        for (int i=1; i<word.length(); i++) {
            int j = rnd.nextInt(i);
            char tmpChar = chars[i];
            chars[i] = chars[j];
            chars[j] = tmpChar;
        }

        return String.copyValueOf(chars);
    }
}
